package com.etogc.view.recyclerView;

import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;

/**
 * Created by ZeroVoid on 2018-3-19.
 */

public class YcRecyclerView extends RecyclerView {
    public YcRecyclerView(Context context) {
        super(context);
        initDefaultConfig(context);
    }

    public YcRecyclerView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initDefaultConfig(context);
    }

    public YcRecyclerView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        initDefaultConfig(context);
    }

    private void initDefaultConfig(Context context) {
        setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false));
        addItemDecoration(new RecyclerView.ItemDecoration() {
        });
    }
}
